[client]
port = {{ mysql_port }}
socket=/tmp/mysql.sock

[mysqld]
port = {{ mysql_port }}
user = {{ user }}
server-id = {{ ansible_default_ipv4.address.split(".")[-1] }} 
skip-name-resolve
max_connections = 4000
lower_case_table_names = 1
default_time_zone = +8:00
default_storage_engine = InnoDB
character-set-server = utf8mb4
collation-server = utf8mb4_general_ci
init_connect='SET collation_connection = utf8mb4_general_ci'
init_connect='SET NAMES utf8mb4'

basedir={{ basedir }}
datadir={{ datadir }}
socket=/tmp/mysql.sock
log-error={{ datadir }}/mysql.log
pid-file={{ datadir }}/mysqld.pid
log-bin={{ logdir }}/mysql3306-bin

binlog_format = ROW
expire_logs_days = 91

transaction-isolation = READ-COMMITTED

sql-mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'